package com.example.entity.vo;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@Api(tags = "审批配置详细信息vo")
public class WorkflowConfigVo {

    @ApiModelProperty("审批单头唯一ID  uuid")
    private String id;

    @ApiModelProperty("审批编号")
    private String workflowConfigNo;

    @ApiModelProperty("审批单头名称")
    private String workflowConfigName;

    @ApiModelProperty("创建时间")
    private String createTime;

    @ApiModelProperty("创建人名称")
    private String creatorName;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("上报时触发的方法")
    private String reportMethod;

    @ApiModelProperty("取消上报时触发的方法")
    private String unReportMethod;

    @ApiModelProperty("对应的人员分级信息")
    List<WorkflowLevelConfigVo> levels;

    @Data
    public static class WorkflowLevelConfigVo{

        @ApiModelProperty("审批单身唯一ID")
        private String id;

        @ApiModelProperty("审批阶段")
        private String level;

        @ApiModelProperty("阶段结束后，要调用的后端方法")
        private String endTrigger;

        @ApiModelProperty("备注")
        private String remark;

        @ApiModelProperty("所有审批人信息")
        private List<WorkflowConfigVo.WorkflowPersonConfigVo> persons;
    }

    @Data
    public static class WorkflowPersonConfigVo{

        @ApiModelProperty("审批人编号")
        private String approverNo;

        @ApiModelProperty("审批人名称")
        private String approverName;
    }

    @Data
    @Api(tags = "审批配置信息")
    public static class WorkflowPersonConfigResult{

        @ApiModelProperty("总数")
        private Long total;

        @ApiModelProperty("结果集")
        private List<WorkflowConfigVo> list;
    }
}
